/*
 * demuxer.h
 *
 *  Created on: Sep 02, 2009
 *      Author: Orlando Arias
 *     License: GPLv3
 */

#ifndef DEMUXER_H_
#define DEMUXER_H_

#include <inttypes.h>
#include <stdbool.h>

typedef struct _demuxer {
	uint8_t *input;		// don't lose this reference!
	uint8_t strobe;
} demuxer;

bool demuxer_create(demuxer *d, uint8_t inputs);
void demuxer_init(const demuxer *d, uint8_t inputs);
void demuxer_setPinout(demuxer *d, const uint8_t *pinArray, uint8_t inputs);
void demuxer_setPin(const demuxer *d, uint8_t pin, uint8_t inputs);
void demuxer_strobeOn(const demuxer *d);
void demuxer_strobeOff(const demuxer *d);

#endif /* DEMUXER_H_ */
